package com.graduate.bssp.service.impl;

import com.graduate.base.entity.PageInfo;
import com.graduate.bssp.entity.Movie;
import com.graduate.bssp.dao.MovieMapper;
import com.graduate.bssp.service.IMovieService;
import com.graduate.base.service.impl.BaseServiceImpl;
import jdk.nashorn.internal.ir.annotations.Ignore;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 电影表 服务实现类
 * </p>
 *
 * @author yongqiangyao
 * @since 2018-02-05
 */
@Service("movieService")
public class MovieServiceImpl extends BaseServiceImpl<MovieMapper, Movie> implements IMovieService {
    @Autowired
    MovieMapper movieMapper;

    @Override
    public List<Movie> selectMovieList(PageInfo<Movie> pageInfo){
       return movieMapper.selectMovieList(pageInfo);
    }

    @Override
    public boolean insertFilm(Movie movie) {
        return movieMapper.insertFilm(movie);
    }

    @Override
    public Integer selectCountList(){
        return movieMapper.selectCountList();
    }

    @Override
    public Movie findById(int id){
        return movieMapper.findById(id);
    }
    @Override
    public Integer updateFilm(Movie movie){
        return movieMapper.updateFilm(movie);
    }
    @Override
    public Integer deleteMovieById(Integer id){
        return movieMapper.deleteMovieById(id);
    }
    @Override
    public Integer selectMovieCountList(PageInfo<Movie> pageInfo){
        return movieMapper.selectMovieCountList( pageInfo);
    }
}
